#include "material.h"

materiale bluMetallico = {
	{0.0, 0.1, 0.80, 1.0},	//ambient
	{0.78, 0.57, 0.11, 1.0},	//diffuse
	{0.99, 0.91, 0.81, 1.0},	//specular
	{0.0, 0.0, 0.0, 1.0},	//emission
	27.8								//shininess
};

materiale ottone = {
	{0.33, 0.22, 0.03, 1.0},	//ambient
	{0.78, 0.57, 0.11, 1.0},	//diffuse
	{0.99, 0.91, 0.81, 1.0},	//specular
	{0.0, 0.0, 0.0, 1.0},	//emission
	27.8								//shininess
};

materiale plasticaRossa = {
	{0.3,0.0,0.0,1.0},
	{0.6,0.0,0.0,1.0},
	{0.8,0.6,0.6,1.0},
	{0.0, 0.0, 0.0, 1.0},	//emission
	32.0
};

materiale marroneOpaco = {
	{0.4,0.19,0.07,1.0},
	{0.1,0.05,0.0,1.0},
	{0.3,0.3,0.3,1.0},
	{0.0, 0.0, 0.0, 1.0},	//emission
	5.0
};

materiale marroneScuroOpaco = {
	{0.2, 0.0, 0.0, 1.0},
	{0.1, 0.0, 0.0, 1.0},
	{0.1, 0.0, 0.0, 1.0},
	{0.0, 0.0, 0.0, 1.0},	//emission
	5.0
};

materiale biancoSplendente = {
	{1,1,1,1.0},
	{1,1,1,1.0},
	{1,1,1,1.0},
	{0.0, 0.0, 0.0, 1.0},	//emission
	100
};

materiale biancoOpaco = {
	{0.5,0.5,0.5,1.0},
	{0.1,0.1,0.1,1.0},
	{1,1,1,1.0},
	{0.0, 0.0, 0.0, 1.0},	//emission
	5
};

materiale grigioOpaco = {
	{0.3,0.3,0.3,1.0},
	{1,1,1,1.0},
	{0,0,0,0.0},
	{0.0, 0.0, 0.0, 1.0},	//emission
	10
};


materiale biancoEmittivo = {
	{1,1,1,1.0},
	{1,1,1,1.0},
	{1,1,1,1.0},
	{1.0, 1.0, 1.0, 1.0},	//emission
	100
};

void materials(materiale* material){
	glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, material->ambient);
	glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, material->diffuse);
	glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, material->specular);
	glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, material->emission);
	glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, material->shine);
}

